var _sz=_sz||[];_sz&&_sz.core&&_sz.core._isloaded!=null?_sz.core.warn&&_sz.core.warn("Script requested to load and execute again, this is not desirable and will be blocked"):(_sz.push(["accountid",6020330]),_sz.push(["region","r1"]),_sz.push(["endpoint","global"]),_sz.push(["detect_struggles",{rageClick:{clickThreshold:4,clickRadius:20,timeWindowMs:2e3},excessiveScroll:{continuous:{pagesThreshold:3,timeWindowMs:1500},backAndForth:{minScrollHeightMultiplier:1.5,pagesThreshold:.5,timeWindowMs:1e3},rage:{directionChanges:4,timeWindowMs:1e3},debounceMs:1e3}}]),_sz.push(["custom",function(){setTimeout(function(){function log(c,a,l){_sz.push(["event",c,a,l])}function getEvent(event){var videoData=event.target.videoTitle;switch(event.data){case 0:log("Video","Stop",videoData);break;case 1:log("Video","Play",videoData);break;case 2:log("Video","Pause",videoData)}}for(var i,videosToTrack=[],videos=document.getElementsByTagName("iframe"),k=0;k0)for(i=0;i-1){$("details.wp-block-details").on("click",function(){track(["Accordion Interaction","clicks",$(this).find("summary").text().trim()])});$(".info-cards-slider .slick-track a.wp-block-button__link").on("click",function(){track(["Click on Related Content","clicks",$(this).attr("aria-label").trim()])});$("main a[href^='#']").on("click",function(){track(["Click on Anchor Links or Page Jumps","clicks",$(this).text().trim()])})}})})(window.jQuery),function($){"use strict";$&&$(document).ready(function(){var testing=!1,track=function(ev){ev=["event"].concat(ev);testing?console.log(ev):_sz.push(ev)},href=window.location.href.toLowerCase(),radialSelect=$("#input_51_13 input").on("click",function(){radialSelect=$(this).attr("value")}),messageRadial=$("#input_51_14 input").on("click",function(){messageRadial=$(this).attr("value")});if(href.indexOf("/")>-1)$("input#gform_submit_button_51").on("click",function(){track(["Form","submit","Service type: "+radialSelect+" and message type: "+messageRadial])})})}(window.jQuery)},"Event Tracking - 4847562"]),_sz.push(["heatmap",{matches:{permanent:["https://www.ouc.com","https://www.ouc.com/about/careers/","https://www.ouc.com/about/careers/internships/","https://www.ouc.com/about/electric-services/","https://www.ouc.com/about/electric-services/what-is-electric-demand/","https://www.ouc.com/about/news/connected/","https://www.ouc.com/about/newsroom/","https://www.ouc.com/about/reliability/","https://www.ouc.com/about/water-services/","https://www.ouc.com/account/alerts/","https://www.ouc.com/account/digital-smart-meters/","https://www.ouc.com/account/pay-my-bill/","https://www.ouc.com/account/service-rates-costs/","https://www.ouc.com/account/start-stop-move/","https://www.ouc.com/account/understanding-my-bill/","https://www.ouc.com/account/usage-dashboard/","https://www.ouc.com/account/using-myouc/","https://www.ouc.com/cold-weather-tips/","https://www.ouc.com/community/commitment/","https://www.ouc.com/community/community-requests/","https://www.ouc.com/community/focus-areas/","https://www.ouc.com/contact/","https://www.ouc.com/customer-service/report-misuse/","https://www.ouc.com/customer-service/report-outage-problem/","https://www.ouc.com/customer-service/residential-assistance/","https://www.ouc.com/customer-service/weather-safety/storm-center/","https://www.ouc.com/customer-service/weather-safety/storm-center/after-storm/","https://www.ouc.com/customer-service/weather-safety/storm-center/before-a-storm/","https://www.ouc.com/customer-service/weather-safety/storm-center/during-a-storm/","https://www.ouc.com/getgreen/","https://www.ouc.com/high-bill-solutions/","https://www.ouc.com/hotweathertips/","https://www.ouc.com/season-of-savings/","https://www.ouc.com/solutions-programs/billing/budget-billing/","https://www.ouc.com/solutions-programs/billing/ouc-power-pass/","https://www.ouc.com/solutions-programs/business/","https://www.ouc.com/solutions-programs/business/delegated-authority/","https://www.ouc.com/solutions-programs/business/development-services/","https://www.ouc.com/solutions-programs/business/district-cooling/","https://www.ouc.com/solutions-programs/business/economic-development/","https://www.ouc.com/solutions-programs/business/indoor-lighting/","https://www.ouc.com/solutions-programs/business/outdoor-lighting/","https://www.ouc.com/solutions-programs/business/power-quality-consumption/","https://www.ouc.com/solutions-programs/electric-vehicles/","https://www.ouc.com/solutions-programs/electric-vehicles/charging/","https://www.ouc.com/solutions-programs/electric-vehicles/commercial-programs/","https://www.ouc.com/solutions-programs/electric-vehicles/electric-vehicles-benefits/","https://www.ouc.com/solutions-programs/home-warranty-programs/","https://www.ouc.com/solutions-programs/preferred-contractor-network/","https://www.ouc.com/solutions-programs/savings/conservation-audits/","https://www.ouc.com/solutions-programs/savings/efficiency-delivered/efficiency-delivered-homeowners-renter/","https://www.ouc.com/solutions-programs/savings/efficiency-delivered/efficiency-delivered-landlords/","https://www.ouc.com/solutions-programs/savings/rebates/","https://www.ouc.com/solutions-programs/savings/rebates/battery-storage/","https://www.ouc.com/solutions-programs/savings/rebates/ceiling-insulation/","https://www.ouc.com/solutions-programs/savings/rebates/commercial-industrial-incentive-program/","https://www.ouc.com/solutions-programs/savings/rebates/cool-reflective-roof/","https://www.ouc.com/solutions-programs/savings/rebates/duct-repair-replacement/","https://www.ouc.com/solutions-programs/savings/rebates/electric-vehicle-purchase-lease/","https://www.ouc.com/solutions-programs/savings/rebates/heat-pump-ac/","https://www.ouc.com/solutions-programs/savings/rebates/heat-pump-water-heater/","https://www.ouc.com/solutions-programs/savings/rebates/high-efficiency-toilet/","https://www.ouc.com/solutions-programs/savings/rebates/how-to-apply-for-your-rebate/","https://www.ouc.com/solutions-programs/savings/rebates/landscape-irrigation/","https://www.ouc.com/solutions-programs/savings/rebates/multifamily-efficiency-program/","https://www.ouc.com/solutions-programs/savings/rebates/new-commercial-construction/","https://www.ouc.com/solutions-programs/savings/rebates/new-home-construction/","https://www.ouc.com/solutions-programs/savings/rebates/smart-irrigation-controller/","https://www.ouc.com/solutions-programs/savings/rebates/smart-water-monitoring-device/","https://www.ouc.com/solutions-programs/savings/rebates/solar-thermal-water-heater/","https://www.ouc.com/solutions-programs/savings/rebates/window-film-solar-screen/","https://www.ouc.com/solutions-programs/savings/rebates/windows/","https://www.ouc.com/solutions-programs/savings/save-energy-water-tips/","https://www.ouc.com/solutions-programs/solar-programs/","https://www.ouc.com/solutions-programs/solar-programs/rooftop-solar/","https://www.ouc.com/solutions-programs/solar-programs/sunchoice/business/","https://www.ouc.com/solutions-programs/solar-programs/sunchoice/residential/","https://www.ouc.com/welcome-commercial/","https://www.ouc.com/welcome-home/"],include:[],exclude:[]}}]),_sz.push(["event_tracking",{id:6176,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/contact/$",options:"i"}},type:"click",click:{cssSelector:"#wp--skip-link--target > div > div:nth-child(4) > figure > table > tbody > tr:nth-child(1) > td:nth-child(2) > a"},category:{static:"Clicks on Phone Number"},action:{static:"Click"},label:{static:"Phone Number: 24/7 Self-Service Line"}}}]),_sz.push(["event_tracking",{id:6177,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/contact/$",options:"i"}},type:"click",click:{cssSelector:"#wp--skip-link--target > div > div:nth-child(4) > figure > table > tbody > tr:nth-child(3) > td:nth-child(2) > a"},category:{static:"Clicks on Phone Number"},action:{static:"Click"},label:{static:"Phone Number: Water Quality Issues or Concerns"}}}]),_sz.push(["event_tracking",{id:6178,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/contact/$",options:"i"}},type:"click",click:{cssSelector:"#wp--skip-link--target > div > div:nth-child(4) > figure > table > tbody > tr:nth-child(2) > td:nth-child(2) > a"},category:{static:"Clicks on Phone Number"},action:{static:"Click"},label:{static:"Phone Number: Report Streetlight Problems"}}}]),_sz.push(["event_tracking",{id:6179,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/contact/$",options:"i"}},type:"click",click:{cssSelector:"#wp--skip-link--target > div > div:nth-child(4) > figure > table > tbody > tr:nth-child(4) > td:nth-child(2) > a"},category:{static:"Clicks on Phone Number"},action:{static:"Click"},label:{static:"Phone Number: All Other Inquiries"}}}]),_sz.push(["event_tracking",{id:6180,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/customer-service/report-misuse/report-utility-theft/$",options:"i"}},type:"click",click:{cssSelector:"input#gform_submit_button_30"},category:{static:"Form"},action:{static:"Submit"},label:{static:"Report Utility Misuse or Theft"}}}]),_sz.push(["event_tracking",{id:6181,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/customer-service/report-outage-problem/report-streetlight-outage/$",options:"i"}},type:"click",click:{cssSelector:"input#gform_submit_button_29"},category:{static:"Form"},action:{static:"Submit"},label:{static:"Report a Streetlight Outage"}}}]),_sz.push(["event_tracking",{id:6182,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/customer-service/report-outage-problem/request-tree-trimming/$",options:"i"}},type:"click",click:{cssSelector:"input#gform_submit_button_33"},category:{static:"Form"},action:{static:"Submit"},label:{static:"Request Tree Trimming"}}}]),_sz.push(["event_tracking",{id:6183,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/solutions-programs/business/district-cooling/contact-oucs-district-cooling/$",options:"i"}},type:"click",click:{cssSelector:"input#gform_submit_button_49"},category:{static:"Form"},action:{static:"Submit"},label:{static:"Partner with OUC for Reliable Chilled Water Solutions"}}}]),_sz.push(["event_tracking",{id:6184,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/solutions-programs/business/indoor-lighting/contact/$",options:"i"}},type:"click",click:{cssSelector:"input#gform_submit_button_7"},category:{static:"Form"},action:{static:"Submit"},label:{static:" Contact OUC’s Lighting Department"}}}]),_sz.push(["event_tracking",{id:6185,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/solutions-programs/electric-vehicles/commercial-programs/ev-charging-contact/$",options:"i"}},type:"click",click:{cssSelector:"input#gform_next_button_56_21"},category:{static:"form"},action:{static:"click"},label:{static:"Contact Us About Our Commercial EV Services"}}}]),_sz.push(["event_tracking",{id:6186,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/solutions-programs/savings/conservation-audits/schedule-audit-residential/$",options:"i"}},type:"click",click:{cssSelector:"input#gform_submit_button_19"},category:{static:"Form"},action:{static:"Submit"},label:{static:"Residential Customers: Schedule Your Energy & Water Conservation Audit"}}}]),_sz.push(["event_tracking",{id:6187,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/solutions-programs/solar-programs/sunchoice/business/sign-up/$",options:"i"}},type:"click",click:{cssSelector:"input#gform_submit_button_44"},category:{static:"Form"},action:{static:"Submit"},label:{static:" Enroll in SunChoice | Business & Commercial Customers"}}}]),_sz.push(["event_tracking",{id:6188,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/solutions-programs/solar-programs/sunchoice/residential/sign-up/$",options:"i"}},type:"click",click:{cssSelector:"input#gform_submit_button_6"},category:{static:"Form"},action:{static:"Submit"},label:{static:"Enroll in SunChoice | Residential Customers"}}}]),_sz.push(["event_tracking",{id:6322,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/contact/$",options:"i"}},type:"click",click:{cssSelector:"a[href='https://my.ouc.com/myouc/BillingAndPayment_Home']"},category:{static:"myOUC"},action:{static:"click"},label:{static:"myOUC Bill Pay Button in Contact Page"}}}]),_sz.push(["event_tracking",{id:6323,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/contact/$",options:"i"}},type:"click",click:{cssSelector:"div.wp-block-button.is-style-outline.is-style-outline--7 > a.wp-block-button__link.wp-element-button"},category:{static:"myOUC"},action:{static:"click"},label:{static:"myOUC Service Request Button in Contact Page"}}}]),_sz.push(["event_tracking",{id:6324,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/contact/$",options:"i"}},type:"click",click:{cssSelector:"div.wp-block-button.is-style-outline.is-style-outline--8 > a.wp-block-button__link.wp-element-button"},category:{static:"myOUC"},action:{static:"click"},label:{static:"myOUC Outage Report Button in Contact Page"}}}]),_sz.push(["event_tracking",{id:6325,configuration:{trackOn:{urlMatch:{pattern:"^https://www\\.ouc\\.com/contact/$",options:"i"}},type:"click",click:{cssSelector:"div.wp-block-button.is-style-outline.is-style-outline--9 > a.wp-block-button__link.wp-element-button"},category:{static:"myOUC"},action:{static:"click"},label:{static:"myOUC Outage Bill View Button in Contact Page"}}}]),_sz.push(["event_tracking",{id:6327,configuration:{trackOn:{urlMatch:{pattern:"https://www\\.ouc\\.com/solutions-programs/savings/rebates/",options:"i"}},type:"click",click:{cssSelector:"div.wp-block-button.button-white > a.wp-block-button__link.has-primary-color.has-base-background-color.has-text-color.has-background.has-link-color.wp-element-button"},category:{static:"myouc"},action:{static:"click"},label:{static:"Click to Rebate Application"}}}]),_sz=_sz||[],function(w,d,sz,undefined){function process(args){var name=args[0];core.actions[name]===undefined?core.action("set",args):core.action(name,args.slice(1))}var core={curr:w.location.href,ref:d.referrer,esc:function(str){return encodeURIComponent(new String(str).replace(/(\r?\n)+/g," ").replace(/\s+/g," ").replace(/^\s+|\s+$/,""))},empty:function(e){return e==undefined||e==null||e==""},isarray:function(arr){return arr==undefined||arr==null?!1:Array&&typeof Array.isArray=="function"?Array.isArray(arr):Object.prototype.toString.call(arr)==="[object Array]"},tag:function(str){return d.getElementsByTagName?d.getElementsByTagName(str):[]},id:function(str){return d.getElementById?d.getElementById(str):!1},clone:function(o){var n={};for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i]);return n},rnd:function(){return Math.floor(Math.random()*1e5)},txt:function(o){return o.textContent?o.textContent:o.innerText},trim:function(str){return!str||typeof str!="string"?str:typeof str.trim=="function"?str.trim():str.replace(/^\s+|\s+$/gi,"")},uuid:function(){var S4=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4()},navtime:function(){var perf=w.performance||w.webkitPerformance||w.mozPerformance||w.msPerformance;return!perf||!perf.timing||perf.timing.navigationStart<1?null:(new Date).getTime()-perf.timing.navigationStart},_isready:!1,_readyhandlers:[],register:function(n,f){f.base=this.actions[n];this.actions[n]=f},actions:{},action:function(n,a){this.actions[n].apply(this.actions,a)},data:[],ready:function(f){if(f===undefined)return this._isready||core.done();this.when(this.ready,f)},queueready:function(f){this._isready&&core.done()?f():this._readyhandlers.push(f)},done:function(){return this._isloaded&&d&&d.body!=null&&(d.readyState=="interactive"||d.readyState=="complete")},_isloaded:!1,_whenTimer:null,when:function(cond,what){cond()?what():setTimeout(function(){core.when(cond,what)},50)},fmt:function(){for(var reg,_a=Array.prototype.slice.call(arguments),s=_a[0],a=_a.slice(1),i=0;i'+(o.type=="warn"?"Warning:<\/b> ":"")+decodeURIComponent(new String(this.fmt.apply(this,o.msg)).replace(/(&[a-z_]+=|\?)/g,"
   $1"))+"<\/p>";_c=d.createElement("a");_c.href="#";_c.innerHTML="× Close";_c.style.cssText="display:block;float:right;color:black;text-decoration:none;";_c.onclick=function(){return _e.parentNode.removeChild(_e),core._logshown=!1,!1};_e=d.createElement("div");_e.style.cssText="position:fixed;top:10px;right:10px;background:white;border:1px #ccc solid;width:800px;padding:20px;padding-bottom:10px;font-size:12px;font-family:Arial;line-height:135%;max-height:90%;overflow-y:auto;text-align:left;z-index:999";_e.innerHTML=s;_e.id="szdebugarea";_e.appendChild(_c);d.body.appendChild(_e)},cookie:function(n,v,o){var expires,date,cookiev,cookies,i,cookie;if(typeof v!="undefined"){o=o||{path:"/"};v===null&&(v="",o.expires=-1);expires="";o.expires&&(typeof o.expires=="number"||o.expires.toUTCString)&&(typeof o.expires=="number"?(date=new Date,date.setTime(date.getTime()+o.expires*864e5)):date=o.expires,expires="; expires="+date.toUTCString());var path=o.path?"; path="+o.path:"; path=/",domain=o.domain?"; domain="+o.domain:"",secure=o.secure?"; secure":"",sameSite=o.sameSite?"; samesite="+o.sameSite:"; samesite=lax";d.cookie=[n,"=",encodeURIComponent(v),expires,path,domain,secure,sameSite,].join("")}else{if(cookiev=null,d.cookie&&d.cookie!=="")for(cookies=d.cookie.split(";"),i=0;i0;){if(key=parts.shift(),prop[key]===undefined){prop=0;break}if(parts.length==0)break;prop=prop[key]}prop&&key?prop[key]=val:core.warn("No property named {0}",name)}),core.register("register",function(args){core.register(args[0],args[1])}),core.register("custom",function(f,name){var msg="Running custom function";name&&name!=""&&(msg+=": "+name+"<\/strong>");core.log(msg);try{f()}catch(e){core.warn("Custom function failed! "+e.message)}}),core.register("setcurr",function(v){core.curr=v}),core.register("setref",function(v){core.ref=v}),core.register("loaded",function(){core._isloaded=!0}),core.register("showlog",function(){core.showlog()}),data=[],orig=[],i=0;i0)core._readyhandlers.shift().call();core._isready=!0});sz.push=function(args){core.data.push(args);core.ready()?process(args):core._readyhandlers.push(function(){process(args)})};sz.core=core}(window,document,_sz),function(w,d,sz,undefined){function request(path,reqObj,callback){sz.core.request(path,reqObj);callback&&typeof callback=="function"&&callback()}function fetchRequest(path,reqObj,fetchOptions){fetchOptions=fetchOptions||{};var resource,requestOptions={},requestParams={};if(reqObj!=null)for(k in reqObj)reqObj.hasOwnProperty(k)&&!sz.core.empty(reqObj[k])&&(requestParams[k]=reqObj[k]);return fetchOptions.method=="POST"||fetchOptions.method=="post"?(resource="https://"+path,requestOptions={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(requestParams)}):(resource="https://"+sz.core.requesturl(path,requestParams),requestOptions={method:"GET"}),fetchOptions.keepAlive===!0&&(requestOptions.keepalive=!0),sz.core.fetch(resource,requestOptions)}function trackOnClick(href){request(sz.analytics.endpoint.fullpath(),{accountid:opts.accountid,prev:opts.prev,ourl:href,ref:w.location.href,autoonclick:1,ckl:opts.ckl,rt:null})}function excludeOnClick(href,exclusions){var currentHref,i;try{if(currentHref=w.location.href.split("#")[0],href==null||href==""||href.toLowerCase().indexOf("javascript:")==0||href.indexOf("#")==0||href.charAt(href.length-1)=="#"||href==w.location.href||href==currentHref||href.indexOf(currentHref+"#")==0)return!0;if(sz.core.isarray(exclusions)!==!0)return!1;for(i=0;i{tracker.updateState()}),tracker.updateState(),tracker},internalEventTypes={afterPageviewTracked:"after_pageview_tracked"},internalEventHandlers={notify:function(eventType){var args=Array.prototype.slice.call(arguments,1),eventTypeConfiguration=internalEventHandlers[eventType],listeners,i;if(eventTypeConfiguration&&typeof eventTypeConfiguration=="object"&&(listeners=eventTypeConfiguration.listeners,listeners&&listeners.length&&!(listeners.length<1)))for(i=0;i0&&(pingValues.tms=trackedTimeMs)),sz.analytics.observer!=null&&(observedEvents=sz.analytics.observer.isRecording?sz.analytics.observer.recordedEvents:0,observedEvents>0&&(pingValues.obsevt=observedEvents),observedDuration=sz.analytics.observer.isRecording?sz.analytics.observer.recordedDuration:0,observedDuration>0&&(pingValues.obstms=observedDuration)),Object.keys(pingValues)<1)||(nextPing=JSON.stringify(pingValues),nextPing!=lastPing)&&(whenTracked(function(){fetchRequest(sz.analytics.endpoint.fullpath("ping.aspx"),pingParams(pingValues),{method:"GET",keepAlive:d.visibilityState=="hidden"})}),lastPing=nextPing))});sz.core.register(registry.dump,function(){console.debug(sz.analytics);console.debug(opts);console.debug(internalOpts)});sz.core.register(registry.noOnClick,function(v){sz.analytics.config.noonclick=v});sz.core.register(registry.afterPageviewTracked,function(handler){typeof handler=="function"?internalEventHandlers[internalEventTypes.afterPageviewTracked].listeners.push(handler):sz.core.warn("Invalid argument provided to after pageview tracked, was expecting function, but got {0}",typeof handler)});sz.core.register(registry.set,function(name,value){opts.hasOwnProperty(name)?opts[name]=value:this.set.base(name,value)});sz.core.register(registry.breadcrumbs,function(selector){var bc,extractedPath;(internalOpts.breadcrumbsSelector=selector,selector&&d.querySelector)&&(bc=d.querySelector(selector),bc&&(extractedPath=sz.core.trim(sz.core.txt(bc)),sz.core.empty(extractedPath)||sz.push([registry.path,extractedPath])))});sz.core.register(registry.path,function(newPath){sz.core.empty(newPath)||(opts.path=newPath,sz.push([registry.kvp,"path",newPath]),sz.core.log("Path set: {0}",newPath))});sz.core.register(registry.groupSelector,function(selector){var res,groups,i,t,values,j;if(internalOpts.groupSelector=selector,selector&&d.querySelectorAll){for(res=d.querySelectorAll(selector),groups=[],sz.core.empty(opts.groups)||(groups=opts.groups.split(",")),i=0;i0&&(opts.groups=groups.join(","),sz.push([registry.kvp,"szGroupName",groups]),sz.core.log("Groups set: {0}",groups.join(", ")))}});sz.core.register(registry.metaGroupName,function(name){var me,gc,i,metaValue,values,j;for(internalOpts.metaGroupName=name,me=sz.core.tag("meta"),gc=[],sz.core.empty(opts.groups)||(gc=opts.groups.split(",")),i=0;i0&&(opts.groups=gc.join(","),sz.push([registry.kvp,"szGroupName",gc]),sz.core.log("Metagroup set: {0}",gc.join(", ")))});sz.core.register(registry.param,function(n,v){if(typeof n=="object")for(i in n)n.hasOwnProperty(i)&&sz.push([registry.param,i,n[i]]);else sz.core.log("Param {0} = {1}",n,v),internalOpts.grk==null&&(internalOpts.grk={}),internalOpts.grk[n]=v});getKvpValues=function(input){var values=[];if(sz.core.isarray(input))for(i=0;i0)for(i=0;i?@\[\\\]^_`{|}~]/.test(chr)?"\\":"")+chr}).join(""))},isUniqueSelector:function(str,el){if(!state.supportQuerySelector||!str)return!1;var matches=d.querySelectorAll(str);return matches.length===1&&matches[0]===el},pathFromSrc:function(src){var a=d.createElement("a"),pathName;return a.href=src,pathName=a.pathname,a=null,pathName||""},parent:function(el){var parent=el.parentNode;return parent.nodeType==1&&!/\b(html|body|head)\b/i.test(parent.tagName)?parent:null},childSelector:function(el,tagName){var i,sibling;if(!el.parentNode)return null;var siblings=el.parentNode.children,siblingsLength=siblings.length,index=0,theOnlyType=!0;for(i=0;i":"")+tagName+(childSelector||"")},cssSelector:function(el){var orgEl=el,selector="",s="",filename="",pathname="",tagName,uniqueClass,uniqueClassCount,i,l,cl,count,hash,hostname,name,labelFor,pseudoChild;do{if(!el.tagName)return"";if(tagName=el.tagName.toLowerCase(),/\b(html|body|head)\b/i.test(tagName))return tagName+selector;var id=el.id,className=sz.core.trim(el.className),classList=el.classList||className.split(/\s+/);if(typeof id!="string"&&(id=null),id&&((id=helpers.cssEscape(id),s="#"+id+selector,helpers.isUniqueSelector(s,orgEl))||(s=tagName+"[id='"+id.replace("'","\\'")+"']"+selector,helpers.isUniqueSelector(s,orgEl))))return s;if(uniqueClass="",className&&d.getElementsByClassName){for(uniqueClassCount=Infinity,i=0,l=classList.length;i"+selector));return selector},viewPort:function(){return{l:Math.round((w.pageXOffset||d.documentElement.scrollLeft)-(d.documentElement.clientLeft||0)),t:Math.round((w.pageYOffset||d.documentElement.scrollTop)-(d.documentElement.clientTop||0)),w:Math.round(w.innerWidth||d.documentElement.clientWidth||w.screen.width),h:Math.round(w.innerHeight||d.documentElement.clientHeight||w.screen.height)}},elementPoint:function(e,boundingElement){e=e||w.event;var pagePoint=helpers.pagePoint(e),rect=boundingElement.getBoundingClientRect(),scrollTop=d.documentElement.scrollTop?d.documentElement.scrollTop:d.body.scrollTop,scrollLeft=d.documentElement.scrollLeft?d.documentElement.scrollLeft:d.body.scrollLeft;return{x:Math.round(pagePoint.x-(rect.left+scrollLeft)),y:Math.round(pagePoint.y-(rect.top+scrollTop))}},pagePoint:function(e){e=e||w.event;var pageX=e.pageX,pageY=e.pageY;return pageX===undefined&&(pageX=e.clientX+d.body.scrollLeft+d.documentElement.scrollLeft,pageY=e.clientY+d.body.scrollTop+d.documentElement.scrollTop),{x:pageX,y:pageY}},preEventHandler:function(){state.scrollCount<1&&state.clickCount<1&&dispatch({pos:state.initViewPort,type:"scroll"})}},listeners,hmOrder,matcher;sz.analytics.heatmap={config:config,state:state,helpers:helpers};listeners={click:function(e){var srcElement,boundingElement,path,entry;e.szbHandled!==!0&&(helpers.preEventHandler(e),state.clickCount++,srcElement=helpers.sourceElement(e),boundingElement=helpers.boundingElement(srcElement),boundingElement!=null)&&(path=helpers.cssSelector(boundingElement),path&&path!="html")&&(entry={path:path,point:helpers.elementPoint(e,boundingElement),type:"click"},dispatch(entry),e.szbHandled=!0)},scroll:function(e){state.scrollHandle!=null&&clearTimeout(state.scrollHandle);state.scrollHandle=setTimeout(function(){helpers.preEventHandler(e);state.scrollCount++;var view=helpers.viewPort();(view.t!=state.lastViewPort.t||view.h!=state.lastViewPort.h)&&(dispatch({pos:view,type:"scroll"}),state.lastViewPort=view)},config.scrollDelay)},resize:function(){var cur=helpers.viewPort();state.scrollCount&&cur.h==state.lastViewPort.h||listeners.scroll()}};hmOrder=0;matcher={keys:Object.keys?Object.keys:function(o){var k,p;if(o!==Object(o))throw new TypeError("Object.keys called on a non-object");k=[];for(p in o)Object.prototype.hasOwnProperty.call(o,p)&&k.push(p);return k},extract:function(arr){for(var kv,k,v,obj={},ix=0;ix1&&(k=kv.shift(),v=kv.join("="),v.length>0&&(obj[k]=v));return obj},decompose:function(url){url=encodeURI(decodeURI(sz.core.trim(url||"").replace(/^.*?:\/\//g,"").split("#")[0]));var parts=url.split("?"),base=parts.shift().replace(/^www\./,"").replace(/\/+$/,""),params=this.extract(parts.join("?").split("&"));return{resource:base,params:params}},check_url:function(current,match){var keys,ix,k;if(current.resource===match.resource){for(keys=this.keys(match.params),ix=0;ixinclude = "{0}"
exclude = "{1}"',encodeURI(includeMatch||""),encodeURI(excludeMatch||"")),result},matches:{permanent:[],include:[],exclude:[]},add_matches:function(m){m!=null&&(this.is_array(m.permanent)&&(this.matches.permanent=this.matches.permanent.concat(m.permanent)),this.is_array(m.include)&&(this.matches.include=this.matches.include.concat(m.include)),this.is_array(m.exclude)&&(this.matches.exclude=this.matches.exclude.concat(m.exclude)))},replacements:[],add_replacement:function(r){this.is_function(r)&&this.replacements.push(r)},is_function:function(x){return x!=null&&typeof x=="function"&&x instanceof Function},is_array:function(x){return x!=null&&x instanceof Array&&x.concat!=undefined&&x.length!=undefined},cur_url:function(){var u=((sz.analytics&&sz.analytics.opts?sz.analytics.opts("url"):"")||sz.core.curr).toLowerCase(),k;if(this.replacements&&this.replacements.length>0)for(k=0;k *:nth-child(1)").length===1}catch(e){state.supportQuerySelector=!1}sz.core.log("Enabling behaviour map tracking");state.running=!0;state.lastViewPort=helpers.viewPort();state.initViewPort=helpers.viewPort();initializeListeners()}});sz.core.ready(function(){sz.core.log("Running behaviour map ready at {0}",(new Date).getTime());sz.push(["heatmapinit"])})}(window,document,_sz),function(sz){"use strict";(()=>{function now(){return Date.now()}function getDistance(a,b){return Math.hypot(a.x-b.x,a.y-b.y)}function takeWhileReverse(arr,predicate,startIndex){const result=[];for(let i=startIndex!=null?startIndex:arr.length-1;i>=0&&i0&&arr.splice(0,toRemoveCount),toRemoveCount}function isElement(val){return val!=null&&val instanceof Element}function pagePoint(e){return{x:Math.round(e.pageX),y:Math.round(e.pageY)}}function targetPoint(e,target){var _a,_b;const point=pagePoint(e);var rect=target.getBoundingClientRect(),scrollTop=((_a=document.documentElement)==null?void 0:_a.scrollTop)!=null?document.documentElement.scrollTop:document.body.scrollTop,scrollLeft=((_b=document.documentElement)==null?void 0:_b.scrollLeft)!=null?document.documentElement.scrollLeft:document.body.scrollLeft;return{x:Math.round(point.x-rect.left-scrollLeft),y:Math.round(point.y-rect.top-scrollTop)}}function getWindowDimensions(sz2){var _a,_b,_c,_d;let windowWidth=(_a=window.innerWidth)!=null?_a:0,windowHeight=(_b=window.innerHeight)!=null?_b:0;const helpers=(_d=(_c=sz2.analytics)==null?void 0:_c.heatmap)==null?void 0:_d.helpers;if(isObject(helpers)&&isFunction(helpers.viewPort)){const viewPort=helpers.viewPort();windowWidth=viewPort.w;windowHeight=viewPort.h}return{width:windowWidth,height:windowHeight}}function getElementSelector(sz2,element){var _a,_b;let elementSelector="";const helpers=(_b=(_a=sz2.analytics)==null?void 0:_a.heatmap)==null?void 0:_b.helpers;if(isObject(helpers)&&isFunction(helpers.boundingElement)&&isFunction(helpers.cssSelector)){const boundingElement=helpers.boundingElement(element);boundingElement&&(elementSelector=helpers.cssSelector(boundingElement))}return elementSelector}function isStruggleTracker(value){return isObject(value)&&typeof value.logStruggle=="function"&&typeof value.setTrackingContext=="function"}var __typeError=msg=>{throw TypeError(msg);},__accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg),__privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),analyticsRegistry={afterPageviewTracked:"after_pageview_tracked",ping:"ping"},_sz,_trackers,StruggleManager=class{constructor(sz2){__privateAdd(this,_sz);__privateAdd(this,_trackers,{});__privateSet(this,_sz,sz2)}addTracker(tracker){const existing=__privateGet(this,_trackers)[tracker.type];existing&&(__privateGet(this,_sz).core.log("Uninstalling struggle tracker: {0}",tracker.type),existing.uninstall());__privateGet(this,_sz).core.log("Installing struggle tracker: {0}",tracker.type);__privateGet(this,_trackers)[tracker.type]=tracker;tracker.install()}clearTrackers(){[...Object.values(__privateGet(this,_trackers))].forEach(tracker=>{tracker.uninstall(),delete __privateGet(this,_trackers)[tracker.type]})}},isObject,isFunction,_sz2,_config,_handler,_listeners,_clickBuffer,RageClickTracker,RageClickStruggle,_sz3,_config2,_handler2,_listeners2,_continuousScrollBuffer,_backAndForthScrollBuffer,_rageScrollBuffer,_lastY,_lastDirection,ExcessiveScrollTracker,ExcessiveScrollStruggle,StruggleTracker;_sz=new WeakMap;_trackers=new WeakMap;isObject=x=>x!=null&&typeof x=="object";isFunction=x=>x!=null&&typeof x=="function";RageClickTracker=(class{constructor(sz2,config){__privateAdd(this,_sz2);__privateAdd(this,_config);__privateAdd(this,_handler,null);__privateAdd(this,_listeners,[]);__privateAdd(this,_clickBuffer,[]);this._type="rage_click";__privateSet(this,_sz2,sz2);__privateSet(this,_config,{...config})}get type(){return this._type}install(){if(__privateGet(this,_handler)==null){const self=this;__privateSet(this,_handler,function(e){self.handleClick.call(self,e)});window.addEventListener("click",__privateGet(this,_handler),{capture:!0,passive:!0})}}uninstall(){__privateGet(this,_handler)!=null&&(window.removeEventListener("click",__privateGet(this,_handler)),__privateSet(this,_handler,null))}addListener(listener){__privateGet(this,_listeners).push(listener)}clearListeners(){__privateGet(this,_listeners).length=0}emitStruggle(struggle){__privateGet(this,_sz2).core.log("🔥 Rage click detected: {0}",JSON.stringify(struggle.debugLog()));__privateGet(this,_listeners).forEach(listener=>{try{listener(struggle)}catch(err){__privateGet(this,_sz2).core.warn("Failed to notify rage click listener: {0}",err instanceof Error?err.message:err)}})}handleClick(e){if(isElement(e.target)){const point=targetPoint(e,e.target);__privateGet(this,_clickBuffer).push({clientX:e.clientX,clientY:e.clientY,timestamp:now(),target:e.target,targetX:point.x,targetY:point.y});this.detectRageClick()}}detectRageClick(){this.pruneOldClicks();for(let i=0;i<__privateGet(this,_clickBuffer).length;i++){const base=__privateGet(this,_clickBuffer)[i],basePoint={x:base.clientX,y:base.clientY},cluster=__privateGet(this,_clickBuffer).filter(clickRecord=>{if(clickRecord.target===base.target)return!0;const distance=getDistance({x:clickRecord.clientX,y:clickRecord.clientY},basePoint);if(distance<=__privateGet(this,_config).clickRadius)return!0});if(cluster.length>=__privateGet(this,_config).clickThreshold){const elementSelector=getElementSelector(__privateGet(this,_sz2),base.target),windowDimensions=getWindowDimensions(__privateGet(this,_sz2)),delta=cluster[cluster.length-1].timestamp-cluster[0].timestamp;this.emitStruggle(new RageClickStruggle({type:"rage_click",x:base.targetX,y:base.targetY,node:base.target,elementSelector,clicks:cluster.length,delta,windowWidth:windowDimensions.width,windowHeight:windowDimensions.height}));this.clearClicks();return}}}pruneOldClicks(){const t=now();removeWhile(__privateGet(this,_clickBuffer),x=>t-x.timestamp>__privateGet(this,_config).timeWindowMs)}clearClicks(){__privateGet(this,_clickBuffer).length=0}});_sz2=new WeakMap;_config=new WeakMap;_handler=new WeakMap;_listeners=new WeakMap;_clickBuffer=new WeakMap;RageClickStruggle=(class{constructor(struggle){this.type="rage_click";this.x=struggle.x;this.y=struggle.y;this.node=struggle.node;this.elementSelector=struggle.elementSelector;this.clicks=struggle.clicks;this.delta=struggle.delta;this.windowWidth=struggle.windowWidth;this.windowHeight=struggle.windowHeight}logParameters(){return{st:"rage",p:this.elementSelector,cx:this.x,cy:this.y,cc:this.clicks,cd:this.delta,ww:this.windowWidth,wh:this.windowHeight}}sessionRecordableCustomEvent(){return{type:"rage_click",event:{node:this.node,clicks:this.clicks,delta:this.delta,x:this.x,y:this.y}}}debugLog(){return{elementSelector:this.elementSelector,x:this.x,y:this.y,windowWidth:this.windowWidth,windowHeight:this.windowHeight,clicks:this.clicks,delta:this.delta}}});ExcessiveScrollTracker=(class{constructor(sz2,config){__privateAdd(this,_sz3);__privateAdd(this,_config2);__privateAdd(this,_handler2,null);__privateAdd(this,_listeners2,[]);__privateAdd(this,_continuousScrollBuffer,{scrolls:[]});__privateAdd(this,_backAndForthScrollBuffer,{scrolls:[]});__privateAdd(this,_rageScrollBuffer,{scrolls:[]});__privateAdd(this,_lastY,0);__privateAdd(this,_lastDirection,null);this._type="excessive_scroll";__privateSet(this,_sz3,sz2);__privateSet(this,_config2,{...config});__privateSet(this,_lastY,window.scrollY)}get type(){return this._type}install(){if(__privateGet(this,_handler2)==null){const self=this;__privateSet(this,_handler2,function(){self.handleScroll.call(self)});window.addEventListener("scroll",__privateGet(this,_handler2),{passive:!0})}}uninstall(){__privateGet(this,_handler2)!=null&&(window.removeEventListener("scroll",__privateGet(this,_handler2)),__privateSet(this,_handler2,null))}addListener(listener){__privateGet(this,_listeners2).push(listener)}clearListeners(){__privateGet(this,_listeners2).length=0}emitStruggle(struggle){__privateGet(this,_sz3).core.log("📜 Excessive scroll detected: {0}",JSON.stringify(struggle.debugLog()));__privateGet(this,_listeners2).forEach(listener=>{try{listener(struggle)}catch(err){__privateGet(this,_sz3).core.warn("Failed to notify excessive scroll listener: {0}",err instanceof Error?err.message:err)}})}handleScroll(){const timestamp=now(),currentY=window.scrollY;if(currentY!==__privateGet(this,_lastY)){const deltaY=currentY-__privateGet(this,_lastY);__privateSet(this,_lastY,currentY);const windowDimensions=getWindowDimensions(__privateGet(this,_sz3));if(!(windowDimensions.height<1)){const jitterThreshold=Math.min(10,.1*windowDimensions.height);if(!(Math.abs(deltaY)0?"down":"up",deltaPages=Math.abs(deltaY)/windowDimensions.height,scroll={direction,deltaPages,scrollY:currentY,timestamp};this.updateBufferAndDetect({buffer:__privateGet(this,_continuousScrollBuffer),predicate:()=>this.shouldDebounce(__privateGet(this,_continuousScrollBuffer),timestamp),updateFn:buffer=>buffer.scrolls.push(scroll),detectFn:()=>this.detectContinuousScroll(timestamp,windowDimensions)});this.updateBufferAndDetect({buffer:__privateGet(this,_backAndForthScrollBuffer),predicate:()=>document.documentElement.scrollHeight<__privateGet(this,_config2).backAndForth.minScrollHeightMultiplier*window.innerHeight||this.shouldDebounce(__privateGet(this,_backAndForthScrollBuffer),timestamp),updateFn:buffer=>buffer.scrolls.push(scroll),detectFn:()=>this.detectBackAndForthScroll(timestamp,windowDimensions)});this.updateBufferAndDetect({buffer:__privateGet(this,_rageScrollBuffer),predicate:()=>this.shouldDebounce(__privateGet(this,_rageScrollBuffer),timestamp),updateFn:buffer=>{__privateGet(this,_lastDirection)!==direction?buffer.scrolls.push(scroll):buffer.scrolls.length>1&&(buffer.scrolls[buffer.scrolls.length-1]=scroll)},detectFn:()=>this.detectRageScroll(timestamp,windowDimensions)});__privateSet(this,_lastDirection,direction)}}}}updateBufferAndDetect(options){const{buffer,predicate,updateFn,detectFn}=options;predicate()||(updateFn(buffer),detectFn())}detectContinuousScroll(now2,windowDimensions){const scrolls=__privateGet(this,_continuousScrollBuffer).scrolls;if(this.pruneOldScrolls(scrolls,now2,__privateGet(this,_config2).continuous.timeWindowMs),!(scrolls.length<1)){if(scrolls.length>1){const lastDirection=scrolls[scrolls.length-1].direction;let i=scrolls.length-1;while(i>0){if(scrolls[i-1].direction!=lastDirection)break;i--}i>0&&scrolls.splice(0,i)}const direction=scrolls[0].direction,totalPages=this.getTotalPages(scrolls);if(totalPages>=__privateGet(this,_config2).continuous.pagesThreshold){const firstScroll=scrolls[0],lastScroll=scrolls[scrolls.length-1];this.emitStruggle(new ExcessiveScrollStruggle({type:"excessive_scroll",start_top:firstScroll.scrollY,end_top:lastScroll.scrollY,pattern:0,scrolls:scrolls.length,forward_pages:direction==="down"?totalPages:0,backward_pages:direction==="up"?totalPages:0,delta:lastScroll.timestamp-firstScroll.timestamp,windowWidth:windowDimensions.width,windowHeight:windowDimensions.height}));this.clearScrolls(scrolls);__privateGet(this,_continuousScrollBuffer).lastEmitted=now2}}}detectBackAndForthScroll(now2,windowDimensions){const scrolls=__privateGet(this,_backAndForthScrollBuffer).scrolls;if(this.pruneOldScrolls(scrolls,now2,__privateGet(this,_config2).backAndForth.timeWindowMs),!(scrolls.length<2)){const lastDir=scrolls[scrolls.length-1].direction;if(scrolls.some(x=>x.direction!==lastDir)){const lastDirScrolls=takeWhileReverse(scrolls,x=>x.direction===lastDir),prevDirScrolls=takeWhileReverse(scrolls,x=>x.direction!==lastDir,scrolls.length-lastDirScrolls.length-1),lastDirPages=this.getTotalPages(lastDirScrolls),prevDirPages=this.getTotalPages(prevDirScrolls);if(lastDirPages>=__privateGet(this,_config2).backAndForth.pagesThreshold&&prevDirPages>=__privateGet(this,_config2).backAndForth.pagesThreshold){const forwardPages=lastDir==="down"?lastDirPages:prevDirPages,backwardPages=lastDir==="up"?lastDirPages:prevDirPages,firstScroll=prevDirScrolls[prevDirScrolls.length-1],lastScroll=lastDirScrolls[0];this.emitStruggle(new ExcessiveScrollStruggle({type:"excessive_scroll",start_top:firstScroll.scrollY,end_top:lastScroll.scrollY,pattern:1,scrolls:lastDirScrolls.length+prevDirScrolls.length,forward_pages:forwardPages,backward_pages:backwardPages,delta:lastScroll.timestamp-firstScroll.timestamp,windowWidth:windowDimensions.width,windowHeight:windowDimensions.height}));this.clearScrolls(scrolls);__privateGet(this,_backAndForthScrollBuffer).lastEmitted=now2}}}}detectRageScroll(now2,windowDimensions){const scrolls=__privateGet(this,_rageScrollBuffer).scrolls;if(this.pruneOldScrolls(scrolls,now2,__privateGet(this,_config2).rage.timeWindowMs),scrolls.length>__privateGet(this,_config2).rage.directionChanges){const firstScroll=scrolls[0],lastScroll=scrolls[scrolls.length-1];this.emitStruggle(new ExcessiveScrollStruggle({type:"excessive_scroll",start_top:firstScroll.scrollY,end_top:lastScroll.scrollY,pattern:2,scrolls:scrolls.length,forward_pages:0,backward_pages:0,delta:lastScroll.timestamp-firstScroll.timestamp,windowWidth:windowDimensions.width,windowHeight:windowDimensions.height}));this.clearScrolls(scrolls);__privateGet(this,_rageScrollBuffer).lastEmitted=now2}}shouldDebounce(buffer,now2){return buffer.lastEmitted!==void 0&&now2-buffer.lastEmitted<__privateGet(this,_config2).detectionDebounceMs}pruneOldScrolls(buffer,now2,timeWindowMs){removeWhile(buffer,x=>now2-x.timestamp>timeWindowMs)}getTotalPages(scrolls){const totalPages=scrolls.reduce((acc,x)=>acc+x.deltaPages,0);return Number(totalPages.toFixed(2))}clearScrolls(scrolls){scrolls.length=0}});_sz3=new WeakMap;_config2=new WeakMap;_handler2=new WeakMap;_listeners2=new WeakMap;_continuousScrollBuffer=new WeakMap;_backAndForthScrollBuffer=new WeakMap;_rageScrollBuffer=new WeakMap;_lastY=new WeakMap;_lastDirection=new WeakMap;ExcessiveScrollStruggle=(class{constructor(struggle){this.type="excessive_scroll";this.start_top=struggle.start_top;this.end_top=struggle.end_top;this.pattern=struggle.pattern;this.scrolls=struggle.scrolls;this.forward_pages=struggle.forward_pages;this.backward_pages=struggle.backward_pages;this.delta=struggle.delta;this.windowWidth=struggle.windowWidth;this.windowHeight=struggle.windowHeight}logParameters(){return{st:"excessive_scroll",scst:this.start_top,scet:this.end_top,scpt:this.getPatternShorthand(this.pattern),scs:this.scrolls,scfw:this.forward_pages,scbw:this.backward_pages,scd:this.delta,ww:this.windowWidth,wh:this.windowHeight}}getPatternShorthand(pattern){switch(pattern){case 2:return"rage";case 1:return"bckfth";case 0:default:return"cont"}}sessionRecordableCustomEvent(){return{type:"excessive_scroll",event:{pattern:this.pattern,scrolls:this.scrolls,forward_pages:this.forward_pages,backward_pages:this.backward_pages,delta:this.delta}}}debugLog(){return{start_top:this.start_top,end_top:this.end_top,pattern:this.pattern,forward_pages:this.forward_pages,backward_pages:this.backward_pages,delta:this.delta,windowWidth:this.windowWidth,windowHeight:this.windowHeight}}}),function(){(sz==null?void 0:sz.core)!=null&&(sz==null?void 0:sz.analytics)!=null&&(sz.core.register("detect_struggles",(config,overwrite)=>{if(sz.analytics.struggleTracker!=null)if(overwrite==!0)sz.core.log("Disabling previously configured struggle tracker"),sz.analytics.struggleTracker.manager&&sz.analytics.struggleTracker.manager.clearTrackers(),sz.analytics.struggleTracker=null;else{sz.core.log("Struggle tracking already enabled, skipping enabling again");return}if(!isObject(config)){sz.core.warn("Could not configure struggle tracker with the supplied configuration: {0}",config?JSON.stringify(config):"null");return}const tracker=new StruggleTracker(sz,config);sz.analytics.struggleTracker=tracker;const struggleTrackers=[];if(isObject(config.rageClick)){const rageClickTracker=new RageClickTracker(sz,config.rageClick);rageClickTracker.addListener(function(struggle){tracker.logStruggle(struggle);const observer=sz.analytics.observer;isObject(observer)&&observer.customEvent(struggle.sessionRecordableCustomEvent())});struggleTrackers.push(rageClickTracker);sz.core.log("Configured rage click tracker with configuration: {0}",JSON.stringify(config.rageClick))}if(isObject(config.excessiveScroll)){const excessiveScrollTracker=new ExcessiveScrollTracker(sz,config.excessiveScroll);excessiveScrollTracker.addListener(function(struggle){tracker.logStruggle(struggle);const observer=sz.analytics.observer;isObject(observer)&&observer.customEvent(struggle.sessionRecordableCustomEvent())});struggleTrackers.push(excessiveScrollTracker);sz.core.log("Configured excessive scroll tracker with configuration: {0}",JSON.stringify(config.excessiveScroll))}struggleTrackers.length>0?(struggleTrackers.forEach(struggleTracker=>{tracker.manager.addTracker(struggleTracker)}),sz.core.log("Installed {0} struggle trackers",struggleTrackers.length)):sz.core.log("No struggle trackers to install")}),sz.push([analyticsRegistry.afterPageviewTracked,function(trackOpts){var _a;const struggleTracker=(_a=sz.analytics)==null?void 0:_a.struggleTracker;if(isStruggleTracker(struggleTracker)){const context={accountId:trackOpts.accountid,logId:trackOpts.luid,url:trackOpts.url,cookieless:trackOpts.ckl,sessionId:trackOpts.prev,counter:0};struggleTracker.setTrackingContext(context)}}]))}();StruggleTracker=(class{constructor(sz2,config){this._recordedStruggles=0;this.buffer=[];this.trackingContext=null;this.sz=sz2;this._config=config;this._manager=new StruggleManager(sz2)}get recordedStruggles(){return this._recordedStruggles}get config(){return this._config}get manager(){return this._manager}logStruggle(struggle){isObject(struggle)&&(this.buffer.push(struggle),this._recordedStruggles++,this.emitStruggles())}setTrackingContext(trackingContext){this.trackingContext!=null&&this.emitStruggles();this.trackingContext=trackingContext;trackingContext!=null&&this.emitStruggles()}emitStruggles(){if(this.trackingContext!=null&&!(this.buffer.length<1)){const struggles=[...this.buffer];this.buffer.length=0;const context=this.trackingContext,route=this.sz.analytics.endpoint.fullpath("struggle.aspx");struggles.forEach(struggle=>{const parameters={aid:context.accountId,luid:context.logId,url:context.url,prev:context.sessionId,ckl:context.cookieless,o:++context.counter,...struggle.logParameters()};this.sz.analytics.request(route,parameters)})}}})})()}(_sz),function(sz){"use strict";(()=>{function isElement(val){return val!=null&&val instanceof Element}function isHTMLInputElement(val){return isElement(val)&&val.tagName=="INPUT"}var handledKey="_sievt";(function(w,d){const tracker={instances:[],activeInstances:[],install:function(config,id){var instance={id,config,execute:!1,installed:!1,handler:function(){sz.core.log("Handler not hooked up for event tracking configuration #{0}",id)},trackEvent:function(){sz.core.log("Track event functionality not configured for event tracking configuration #{0}",id)}};tracker.instances.push(instance);instance.handler=function(evt){instance.execute&&(instance.trackEvent(evt.currentTarget),tracker.flagAsHandled(evt,id))};instance.trackEvent=function(target){if(isElement(target)){var category=tracker.getValue(config.category,target),action=tracker.getValue(config.action,target),label=tracker.getValue(config.label,target);sz.push(["event",category,action,label])}};sz.push(["after_pageview_tracked",function(trackOpts){var url=trackOpts!=null&&trackOpts.url?trackOpts.url:w.location.href;if(!tracker.shouldTrack(config,url,id)){instance.execute=!1;tracker.refreshActiveConfigurations();return}sz.core.log("Installing event tracking configuration #{0} for {1}",id,url);instance.execute=!0;switch(config.type){case"click":instance.installed=tracker.installClickListener(config.click,instance.handler,id);tracker.shared.installClickListener();break;default:instance.installed=!1}tracker.refreshActiveConfigurations()}])},installClickListener:function(clickConfig,handler,id){if(!clickConfig||!clickConfig.cssSelector)return sz.core.warn("Invalid css selector for event tracking configuration #{0} click event: {1}",id,clickConfig?clickConfig.cssSelector:""),!1;try{var elements=d.querySelectorAll(clickConfig.cssSelector);for(let i=0;i